/**
 *    Copyright (C) 2008  Victor Smirnov <aist11@gmail.com>
 *
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License along
 *    with this program; if not, write to the Free Software Foundation, Inc.,
 *    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 *    See LICENSE.exceptions in the root folder of this project for possible
 *    exceptions
 *
 */

#include <cppunit/ui/text/TestRunner.h>

/*#include "BitmapTestSuite.hpp"
#include "BitmapPageHeaderTestSuite.hpp"
#include "PackedValueSetTestSuite.hpp"
#include "PackedValueMapTestSuite.hpp"
#include "PackedMapTestSuite.hpp"
#include "PackedIndexSetTestSuite.hpp"
*/

/*#include "packed_map/PackedValueSetTestSuite.hpp"
#include "packed_map/PackedValueMapTestSuite.hpp"
#include "packed_map/PackedMapTestSuite.hpp"
#include "packed_map/PackedIndexSetTestSuite.hpp"

#include "bitmap/TestSuite.hpp"
#include "bitmap/PageHeaderTestSuite.hpp"

#include "bitvector/BitmapTestSuite.hpp"
#include "bitvector/BitmapRemoveTestSuite.hpp"
#include "bitvector/BTreeTestSuite.hpp"*/

#include "map/BTreeTestSuite.hpp"
#include "map/VectorMapTestSuite.hpp"

/*#include "bitvector/BitmapTestSuite.hpp"
#include "bitvector/BitmapRemoveTestSuite.hpp"
#include "bitvector/BTreeTestSuite.hpp"*/

using namespace cubefs::core::tests;

#define CONSTANTS(size, cache_line)    \
struct constants_##size##_##cache_line {    \
    static int const BLOCK_SIZE = size ;          \
    static int const KIND = 0;                    \
    static int const CACHE_LINE_WIDTH = cache_line;\
}

/*CONSTANTS(4096, 8);
CONSTANTS(4096, 64);

CONSTANTS(256, 8);
CONSTANTS(256, 64);

CONSTANTS(331, 8);
CONSTANTS(331, 64);*/

int
main(int argc, char** argv)
{
  CPPUNIT_NS::TextUi::TestRunner runner;

  //runner.addTest( bitmap::Test<long>::suite() );
  //runner.addTest( bitmap::PageHeaderTest::suite() );

//  runner.addTest( bitvector_ns::BTreeTest::suite() );
//  runner.addTest( bitvector_ns::BitmapTest::suite() );
//  runner.addTest( bitvector_ns::BitmapRemoveTest::suite() );

//  runner.addTest( map_ns::BTreeTest::suite() );
  runner.addTest( map_ns::VectorMapTest::suite() );

  //runner.addTest( packed_map_ns::PackedValueSetTest<constants_4096_8>::suite() );
  //runner.addTest( packed_map_ns::PackedValueMapTest<constants_4096_8>::suite() );
  //runner.addTest( packed_map_ns::PackedIndexSetTest<constants_4096_8>::suite() );

/*  runner.addTest( PackedValueSetTest<constants_4096_64>::suite() );
  runner.addTest( PackedValueMapTest<constants_4096_64>::suite() );
  runner.addTest( PackedIndexSetTest<constants_4096_64>::suite() );

  runner.addTest( PackedValueSetTest<constants_256_8>::suite() );
  runner.addTest( PackedValueMapTest<constants_256_8>::suite() );
  runner.addTest( PackedIndexSetTest<constants_256_8>::suite() );

  runner.addTest( PackedValueSetTest<constants_256_64>::suite() );
  runner.addTest( PackedValueMapTest<constants_256_64>::suite() );
  runner.addTest( PackedIndexSetTest<constants_256_64>::suite() );

  runner.addTest( PackedValueSetTest<constants_331_8>::suite() );
  runner.addTest( PackedValueMapTest<constants_331_8>::suite() );
  runner.addTest( PackedIndexSetTest<constants_331_8>::suite() );

  runner.addTest( PackedValueSetTest<constants_331_64>::suite() );
  runner.addTest( PackedValueMapTest<constants_331_64>::suite() );
  runner.addTest( PackedIndexSetTest<constants_331_64>::suite() );
*/

  bool wasSuccessful = runner.run();
  return wasSuccessful;
}
